As the Internet scales up, a software defined network (SDN) comes into being. The SDN network uses the OpenFlow Protocol, and supports an open interface and multi-controller switching. The SDN network separates a control plane of a network device from a data forwarding plane of the network device, so that network traffic can be flexibly controlled. A function of the control plane is implemented by a controller, and the control plane is mainly responsible for delivering a traffic forwarding policy; a function of the data forwarding plane is implemented by a switch (SW for short), and the data forwarding plane is mainly used to receive a flow table entry delivered by the controller, and perform an operation on a data packet according to the flow table entry. Generally, in an SDN network, a controller is connected to each switch, and the switches are interconnected to implement data packet forwarding.
In the prior art, after receiving an initial packet of a data flow, a switching device supporting the OpenFlow protocol performs flow table matching. When no corresponding flow table entry is found after matching, the initial packet is encapsulated into an information reporting message (for example, a packet_in message), and then the information reporting message is sent to a controller. The controller determines a processing policy for the information reporting message, and then returns a flow table entry update message (for example, a flow_mod message) to the switching device. The switching device parses the flow table entry update message to obtain a flow table entry of the data flow, and processes the received initial packet according to the flow table entry.
It is found during research of the prior art that, if a packet is transmitted in a mobile packet network by using the OpenFlow protocol, a serving gateway can be used as a switching device. However, when a packet is transmitted between serving gateways, a general packet radio service (GPRS) Tunneling Protocol (GTP) tunnel needs to be established, and the packet is encapsulated in an encapsulation manner that is based on the Internet Protocol in User Data Protocol (IPinUDP). Further, because an existing flow table based on the OpenFlow protocol does not support GTP tunnel encapsulation for packets, the transmitted packet cannot be tunneled in the mobile packet network by using the OpenFlow protocol.